package com.web.main.entity.form;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * @create 2020-11-24 15:45
 */
@Data
@ApiModel(value = "接收前端的供应商对象")
public class SupplierForm implements Serializable {

    private static final long serialVersionUID = 3180284780640116016L;

    public interface Add{}
    public interface Modify{}

    @ApiModelProperty(value = "供应商主键，修改必填，添加不填")
//    @NotEmpty(message = "供应商主键不能为空", groups = Modify.class)
//    @Size(min = 19, max = 19, message = "主键长度必须为19位", groups = Modify.class)
    private String supplierId;

    @ApiModelProperty(value = "供应商名字")
    @NotEmpty(message = "供应商名字不能为空", groups = Add.class)
    @Size(max = 15, message = "名字最长{max}个字符", groups = {Add.class, Modify.class})
    private String supplierName;

    @ApiModelProperty(value = "省市区")
    @NotEmpty(message = "省市区不能为空", groups = Add.class)
    @Size(max = 15, message = "区域最长{max}个字符", groups = {Add.class, Modify.class})
    private String supplierProvinces;

    @ApiModelProperty(value = "充电费（单价xx元/度）")
    @NotNull(message = "充电费用不能为空", groups = Add.class)
    private Double supplierRechargeMoney;

    @ApiModelProperty(value = "服务费（单价xx元/度）")
    @NotNull(message = "服务费用不能为空", groups = Add.class)
    private Double supplierServeMoney;

    @ApiModelProperty(value = "停车费（固定xx元）")
    @NotNull(message = "停车费用不能为空", groups = Add.class)
    private Double supplierParkMoney;

    @ApiModelProperty(value = "占用充电桩费用（单价xx元/分钟）")
    @NotNull(message = "占用电桩费用不能为空", groups = Add.class)
    private Double supplierOccupyMonty;

    @ApiModelProperty(value = "负责人联系方式(8位座机)")
    @NotEmpty(message = "负责人联系方式不能为空", groups = Add.class)
    @Size(min = 8, max = 8, message = "电话号码长度为8位", groups = {Add.class, Modify.class})
    private String supplierContact;

}
